If there is a capacity shortage with Fargate Spot, will it automatically be replaced with on-demand capacity?
The issue
We are planning to reduce costs by using Fargate Spot with a capacity provider, and we are investigating the impact in case Fargate Spot capacity becomes unavailable.
If there is a capacity shortage with Fargate Spot, will it automatically be replaced with on-demand capacity?
The solution
No, Fargate will not replace Spot capacity with on-demand capacity.
During periods of extremely high demand, Fargate Spot capacity might be unavailable. This can cause Fargate Spot tasks to be delayed. When this happens, Amazon ECS services retry launching tasks until the required capacity becomes available. Fargate doesn't replace Spot capacity with on-demand capacity.
As mentioned above, automatic replacement does not occur, and it will attempt to launch the task until Fargate Spot capacity becomes available.
For best practices regarding Fargate Spot, please refer to the following AWS Knowledge Center.
Use Fargate Spot capacity providers for Amazon ECS